//
//  BethelPathView.m
//  分享demo
//
//  Created by pc-chtypd056 on 2018/8/8.
//  Copyright © 2018年 CTL. All rights reserved.
//

#import "BethelPathView.h"

@implementation BethelPathView

- (instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        
    }
    return self;
}

- (void)drawRect:(CGRect)rect{
    UIColor *color = [UIColor redColor];
    [color set];
    
    UIBezierPath *path = [UIBezierPath bezierPath];
    [path moveToPoint:CGPointMake(ScreenWIDTH/2, 250)];
    [path addCurveToPoint:CGPointMake(ScreenWIDTH/2, ScreenHEIGH/2+100) controlPoint1:CGPointMake(50, 150) controlPoint2:CGPointMake(30, 300)];
    path.lineWidth = 10;
    path.lineCapStyle = kCGLineCapSquare;
    path.lineJoinStyle = kCGLineJoinBevel;
    
    [path stroke];
    
    UIBezierPath *path2 = [UIBezierPath bezierPath];
    [path2 moveToPoint:CGPointMake(ScreenWIDTH/2, 250)];
    [path2 addCurveToPoint:CGPointMake(ScreenWIDTH/2, ScreenHEIGH/2+100) controlPoint1:CGPointMake(ScreenWIDTH-50, 150) controlPoint2:CGPointMake(ScreenWIDTH-30, 300)];
    path2.lineWidth = 10;
    path2.lineCapStyle = kCGLineCapRound;
    path2.lineJoinStyle = kCGLineJoinBevel;
    
    [path2 stroke];
}

@end
